package com.lz.basic;

public class BubbleSort {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int score[] = { 67, 69, 75, 87, 89, 90, 99, 100 };
		for (int i = 0; i < score.length - 1; i++) {
			for (int j = 0; j < score.length-1; j++) {
				if (score[j] < score[j + 1]) {
					int temp = score[j];
					score[j] = score[j + 1];
					score[j + 1] = temp;

				}

			}
			System.out.print("第" + (i + 1) + "次排序结果：");
			for (int a = 0; a < score.length; a++) {
				System.out.print(score[a] + "\t");
			}
			System.out.println("");
			

		}
		System.out.print("最终排序结果：");
		for (int a = 0; a < score.length; a++) {
			System.out.print(score[a] + "\t");

		}

	}
}